﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="NgoaiTeEdit.aspx.cs" Inherits="Indeco.G24.Website.Admin.NgoaiTeEdit" Title="NgoaiTe Edit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Ngoai Te - Add/Edit</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:MultiFormView ID="FormView1" DataKeyNames="IDNgoaiTe" runat="server" DataSourceID="NgoaiTeDataSource">
		
			<EditItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/NgoaiTeFields.ascx" />
			</EditItemTemplatePaths>
		
			<InsertItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/NgoaiTeFields.ascx" />
			</InsertItemTemplatePaths>
		
			<EmptyDataTemplate>
				<b>NgoaiTe not found!</b>
			</EmptyDataTemplate>
			
			<FooterTemplate>
				<asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" />
				<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />
				<asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
			</FooterTemplate>

		</data:MultiFormView>
		
		<data:NgoaiTeDataSource ID="NgoaiTeDataSource" runat="server"
			SelectMethod="GetByIDNgoaiTe"
		>
			<Parameters>
				<asp:QueryStringParameter Name="IDNgoaiTe" QueryStringField="IDNgoaiTe" Type="String" />

			</Parameters>
		</data:NgoaiTeDataSource>
		
		<br />

		<asp:Panel ID="BangGiaSanPhamPanel2" runat="server" CssClass="collapsePanelHeader"> 
			<div style="padding:5px; cursor: pointer; vertical-align: middle;">
				<div style="float: left; vertical-align: middle;"><asp:Image ID="BangGiaSanPhamImage" runat="server" ImageUrl="~/images/expand_blue.jpg"/></div>
				<div style="float: left; padding-left: 5px;">Bang Gia San Pham Details</div>
				<div style="float: left; margin-left: 20px;"><asp:Label ID="BangGiaSanPhamLabel" runat="server" /></div>
			</div>
		</asp:Panel>	
		<asp:Panel ID="BangGiaSanPhamPanel1" runat="server" CssClass="collapsePanel" Height="0">
		<data:EntityGridView ID="GridViewBangGiaSanPham" runat="server"
			AutoGenerateColumns="False"					
			OnSelectedIndexChanged="GridViewBangGiaSanPham_SelectedIndexChanged"			 			 
			DataSourceID="BangGiaSanPhamDataSource"
			DataKeyNames="IDSanPham, IDNhaCungCap, IDDiaBan"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_BangGiaSanPham.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="KichHoat" HeaderText="Kich Hoat" SortExpression="KichHoat" />				
				<asp:BoundField DataField="ChungThuc" HeaderText="Chung Thuc" SortExpression="ChungThuc" />				
				<asp:BoundField DataField="TrangThai" HeaderText="Trang Thai" SortExpression="TrangThai" />				
				<asp:BoundField DataField="ChoNhapGia" HeaderText="Cho Nhap Gia" SortExpression="ChoNhapGia" />				
				<asp:BoundField DataField="DonGia" HeaderText="Don Gia" SortExpression="DonGia" />				
				<asp:BoundField DataField="VAT" HeaderText="VAT" SortExpression="VAT" />				
				<asp:BoundField DataField="SoLuongTrongKho" HeaderText="So Luong Trong Kho" SortExpression="SoLuongTrongKho" />				
				<asp:BoundField DataField="TieuChuanKyThuat" HeaderText="Tieu Chuan Ky Thuat" SortExpression="TieuChuanKyThuat" />				
				<asp:BoundField DataField="Thongtinthem" HeaderText="Thongtinthem" SortExpression="Thongtinthem" />				
				<asp:BoundField DataField="ThoiDiemDangBaoGia" HeaderText="Thoi Diem Dang Bao Gia" SortExpression="ThoiDiemDangBaoGia" />				
				<asp:BoundField DataField="ThoiDiemHetHieuLuc" HeaderText="Thoi Diem Het Hieu Luc" SortExpression="ThoiDiemHetHieuLuc" />				
				<asp:BoundField DataField="ThoiDiemChinhSua" HeaderText="Thoi Diem Chinh Sua" SortExpression="ThoiDiemChinhSua" />				
				<asp:BoundField DataField="ThoiDiemCapNhat" HeaderText="Thoi Diem Cap Nhat" SortExpression="ThoiDiemCapNhat" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Bang Gia San Pham Found! </b>
				<asp:HyperLink runat="server" ID="hypBangGiaSanPham" NavigateUrl="~/admin/BangGiaSanPhamEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:BangGiaSanPhamDataSource ID="BangGiaSanPhamDataSource" runat="server" SelectMethod="Find">
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:BangGiaSanPhamFilter  Column="IDNgoaiTe" QueryStringField="IDNgoaiTe" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:BangGiaSanPhamDataSource>		
		
		<br />
		</asp:Panel>
		
<ajaxToolkit:CollapsiblePanelExtender ID="cpeBangGiaSanPham" runat="Server" TargetControlID="BangGiaSanPhamPanel1"
            ExpandControlID="BangGiaSanPhamPanel2" CollapseControlID="BangGiaSanPhamPanel2" Collapsed="True"
            TextLabelID="BangGiaSanPhamLabel" ExpandedText="(Hide Details...)" CollapsedText="(Show Details...)"
            ImageControlID="BangGiaSanPhamImage" ExpandedImage="~/images/collapse_blue.jpg" CollapsedImage="~/images/expand_blue.jpg"
            SuppressPostBack="true"/>


</asp:Content>

